package Server.DataBase;

import java.util.ArrayList;
/**
 * parents class Contains parent info.
 */
public class Parent extends User {

	/**
	 //private static final long serialVersionUID = 1L;
	 */
	private static final long serialVersionUID = 1L;
	
	/**
	* is parent block.
	 */
	private int block;
	
	/**
	* parent children
	 */
	private ArrayList<User> Children;

	/**
	* constructor parent init for a students
	 */
	public Parent(int idUser, String userName, String password, int permission,
			int online, String firstName, String lastName, int block,
			ArrayList<User> children) {
		super(idUser, userName, password, permission, online, firstName,
				lastName);
		this.block = block;
		Children = children;
	}
	/**
	 * method init  blocked parents via students
	* @param  user,  block,  children
	 */
	public Parent(User user, int block, ArrayList<User> children) {
		super(user.getIdUser(), user.getUserName(), user.getPassword(), user.getPermission(),
				user.isOnline(), user.getFirstName(), user.getLastName());
		this.block = block;
		Children = children;
	}
		/**
		* check if parents is block
		 */	
	public int isBlock() {
		return block;
	}

	/**
	* @return array children
	 */
	public ArrayList<User> getChildren() {
		return Children;
	}
	/**
	* @param ArrayList<User> children
	 */
	public void setChildren(ArrayList<User> children) {
		Children = children;
	}
	
}
